<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<title>数据统计</title>
<link rel="stylesheet" type="text/css" th:href="@{/plugin/layui/css/layui.css}" />
<script type="text/jscript" th:src="@{/plugin/layui/layui.js}" charset="UTF-8"></script>
<script type="text/jscript" th:src="@{/plugin/jquery.min.js}"></script>
<link rel="stylesheet" type="text/css" th:href="@{/src/ssj/css/customerShow.css}" media="all" />
</head>
<body>
	 <table class="layui-hide" id="countTotal"></table>
	 <table class="layui-hide" id="countSingle"></table>
	 <table class="layui-hide" id="countGoods"></table>
	 <table class="layui-hide" id="customer"></table>
	 <table class="layui-hide" id="countOneGoods"></table>
<script type="text/javascript">         
layui.use('table', function(){
  var table = layui.table;
  table.render({
    elem: '#countTotal',
    url:'[[@{/customer/showCountTotal}]]',
    method: 'get',
    cols: [
    	[
      {field:'countCus',width:200,align : 'center',title: '新增顾客数' },
      {field:'countWi',width:200,align : 'center',title: '入园顾客数'},
      {field:'countOrder',width:200,align : 'center',title: '消费顾客数'}
    ]
    	]
  });
});
</script>  
<script type="text/javascript">         
layui.use('table', function(){
  var table = layui.table;
  table.render({
    elem: '#countSingle',
    url:'[[@{/customer/showCountSingle}]]',
    limit:10,
    page : true,
    method: 'get',
    cols: [
    	[
      {field:'cid', width:120,align : 'center',title: '顾客编号', sort:true},
      {field:'ctel',width:120,align : 'center',title: '顾客电话', sort:true},
      {field:'cname',width:120,align : 'center',title: '顾客名字'},
      {field:'countOneWi',width:120,align : 'center',title: '顾客入园次数', sort:true},
      {field:'countOneOrder',width:120,align : 'center',title: '顾客消费次数', sort:true}
    ]
    	]
  });
});
</script>  
<script type="text/javascript">         
layui.use('table', function(){
  var table = layui.table;
  
  table.render({
    elem: '#countGoods',
    url:'[[@{/customer/showCountGoods}]]',
    limit:10,
    page : true,
    method: 'get',
    cols: [
    	[
      {field:'gid',width:120,align : 'center',title: '商品编号', sort: true},
      {field:'gname',width:120,align : 'center',title: '商品名称'},
      {field:'sid',width:120,align : 'center',title: '商店编号', sort: true},
      {field:'sname',width:120,align : 'center',title: '商店名称'},
      {field:'countNum',width:120,align : 'center',title: '购买总数量', sort: true},
      {field:'countSpend',width:120,align : 'center',title: '购买总额', sort: true}
    ]
    	]
  });
});
</script>
<script type="text/javascript">         
layui.use('table', function(){
  var table = layui.table;
  table.render({
    elem: '#customer',
    url:'[[@{/customer/showCus}]]',
    limit:10,
    page : true,
    method: 'get',
    cols: [
    	[
      {field:'customer_id',width:120,align : 'center',title: '顾客编号' , sort:true},
      {field:'tel',width:120,align : 'center',title: '顾客电话',sort: true},
      {field:'customer_name',width:120,align : 'center',title: '顾客名字'},
      {field:'spend_total',width:240,align : 'center',title: '总消费额',sort: true},
      {field:'customer_createtime',align : 'center',width:120,title: '创建时间', sort: true} ,
      {field:'level_id',width:120,align : 'center',title: '消费等级编号',sort: true }
    ]
    	]
  });
});
 </script>  
<script type="text/javascript">         
layui.use('table', function(){
  var table = layui.table;
  
  table.render({
    elem: '#countOneGoods',
    url:'[[@{/customer/showOneCountGoods}]]',
    limit:10,
    page : true,
    method: 'get',
    cols: [
    	[
    		{field:'gid',width:120,align : 'center',title: '商品编号', sort: true},
    	      {field:'gname',width:120,align : 'center',title: '商品名称'},
    	      {field:'sid',width:120,align : 'center',title: '商店编号',sort: true},
    	      {field:'sname',width:120,align : 'center',title: '商店名称'},
    	      {field:'countOneNum',width:120,align : 'center',title: '购买总数量', sort: true},
    	      {field:'countOneNum',width:120,align : 'center',title: '购买总额', sort: true}
    ]
    	]
  });
});
</script> 
</body>
</html>
